package com.xyzboom.database.dao;

import com.xyzboom.database.entity.Course;
import org.apache.commons.dbutils.ResultSetHandler;

public class CommonDAOUtil {
    public static final String COUNT_COLUMN_LABEL = "count_result";

    public static ResultSetHandler<Integer> getCountHandler() {
        return rs -> {
            if (!rs.next()) {
                return null;
            }
            return rs.getInt(COUNT_COLUMN_LABEL);
        };
    }
}
